package com.ruoyi.appointment.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.utils.ValidateUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * 预约
 * 对象 bus_appointment
 *
 * @author ruoyi
 * @date 2023-09-14
 */
public class BusAppointmentVo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** id主键唯一标识 */
    private Long id;

    /**
     * 用户名
     */
    @NotNull(message = "客户名不能是空")
    private String username;

    /**
     * 联系电话
     */
    @NotNull(message = "联系电话不能是空")
    @Pattern(regexp = ValidateUtils.PHONE_REGEX,message = "电话格式有误")
    private String phone;

    /**
     * 预约时间
     */
    @NotNull(message = "预约时间不能是空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date appointTime;


    /**
     * 车牌号
     */
//    @Excel(name = "车牌号")
    @NotNull(message = "车牌号不能是空")
    @Pattern(regexp = ValidateUtils.LICENSEPLATE_REGEX,message = "车牌号格式有误")
    private String licensePlate;

    /**
     * 汽车类型
     */
    @NotNull(message = "汽车类型不能是空")
    private String carType;

    /**
     * 服务类型 0:维修 1:保养
     */

//    @Excel(name = "服务类型 0:维修 1:保养")
    @NotNull(message = "服务类型不能是空")
    private Long serviceType;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String info;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUsername() {
        return username;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setAppointTime(Date appointTime) {
        this.appointTime = appointTime;
    }

    public Date getAppointTime() {
        return appointTime;
    }

    public void setLicensePlate(String licensePlate) {
        this.licensePlate = licensePlate;
    }

    public String getLicensePlate() {
        return licensePlate;
    }

    public void setCarType(String carType) {
        this.carType = carType;
    }

    public String getCarType() {
        return carType;
    }

    public void setServiceType(Long serviceType) {
        this.serviceType = serviceType;
    }

    public Long getServiceType() {
        return serviceType;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getInfo() {
        return info;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("username", getUsername())
                .append("phone", getPhone())
                .append("appointTime", getAppointTime())
                .append("licensePlate", getLicensePlate())
                .append("carType", getCarType())
                .append("serviceType", getServiceType())
                .append("createTime", getCreateTime())
                .append("info", getInfo())
                .toString();
    }
}
